<%@ include file="/WEB-INF/view/include.jsp"%>
<%-- ${command} --%>
<div style="width: 350px; height:315px;">
	<c:if test="${not empty errorInPreviewPayment}">
		<div style="color: red;">
			<spring:message code="${errorInPreviewPayment}"
				text="Error in preview payment" />
		</div>
	</c:if>
	<c:if test="${empty errorInPreviewPayment}">
		<div class="t_summary-profile-container" style="width: 320px;">
			<h3>
				<spring:message code="payment.preview.paymentinfo" />
			</h3>
		<!--<div><span class="heading"><spring:message code="payment.preview.chargesforapp" /></span></div> -->
		
		<div>
			<table  style="width: 100%" >
				<tr>
					<td>
						<table  style="width: 100%" >
						<tr>
						<td style="width: 70%">
							<table  style="width: 100%" >
										<tr><td><div><span class="heading"><spring:message code="payment.preview.chargesforapp" /></span></div></td></tr>
										<tr><td><span class="subheading"><spring:message code="payment.preview.price" /></span></td></tr>
										<c:if test="${not empty paymentInfoModel.overLoadCharges &&  paymentInfoModel.overLoadCharges!=null}">
										<tr><td><span class="subheading"><spring:message code="payment.preview.emp.overload.chrg" /></span></td></tr>
										</c:if>
										<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
										<tr><td><span class="subheading"><spring:message code="payment.preview.bgprice" /> </span></td></tr>
										</c:if>
										 	<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
										<tr><td><span class="subheading"><spring:message code="payment.preview.totalpr" /> </span></td></tr>
										</c:if>
										<c:if test="${empty paymentInfoModel.bankGuarenteePayment && not empty paymentInfoModel.overLoadCharges}">
										<tr><td><span class="subheading"><spring:message code="payment.preview.totalpr" /> </span></td></tr>
										</c:if>
										
							</table>	
						</td>
				
						<td style="width: 30%">
							<table  style="width: 100%">
								<tr style="height: 100%"><td>&nbsp;</td></tr>
								<tr><td><span class="details">:<span class="details"><fmt:formatNumber value="${paymentInfoModel.serviceCharges}"  pattern="${numberPattern}" /></span></span></td></tr>
								<c:if test="${not empty paymentInfoModel.overLoadCharges &&  paymentInfoModel.overLoadCharges!=null}">
								<tr><td><span class="details">:<fmt:formatNumber value="${paymentInfoModel.overLoadCharges}"  pattern="${numberPattern}" /></span></td></tr>
								</c:if>
								<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
								<tr><td><span class="details">:<fmt:formatNumber value="${paymentInfoModel.bankGuarenteePayment}"  pattern="${numberPattern}" /></span></td></tr>
								</c:if>
								 	<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
								<tr><td><b><span class="details">:<fmt:formatNumber value="${paymentInfoModel.bankGuarenteePayment+paymentInfoModel.price}"  pattern="${numberPattern}" /></span></b></td></tr>
								</c:if>
								<c:if test="${empty paymentInfoModel.bankGuarenteePayment && not empty paymentInfoModel.overLoadCharges}">
								<tr><td><b><span class="details">:<fmt:formatNumber value="${paymentInfoModel.price}"  pattern="${numberPattern}" /></span></b></td></tr>
								</c:if>
							</table>
						</td>
					</tr>
					</table>
					</td>
				</tr>
				<tr>
					<td>
						<table style="width: 100%" >
						<tr>
							<td style="width: 70%">
							<table style="width: 100%">
								<tr><td><div><span class="heading"><spring:message code="payment.preview.av.balance" /></span></div></td></tr>
								<tr><td>	<span class="subheading"><spring:message code="payment.preview.res.acc" />  </span></td></tr>
									<tr><td>	<span class="subheading"><spring:message code="payment.preview.act.acc" /> </span></td></tr>
										<tr><td>	<span class="subheading"><spring:message code="payment.preview.bankguar" /> </span></td></tr>
							</table>	
						</td>
				
						<td style="width: 30%">
							<table style="width: 100%">
								<tr style="height: 100%"><td>&nbsp;</td></tr>
								<tr><td><span class="details">:<fmt:formatNumber value="${paymentInfoModel.reservedAccBalance}"  pattern="${numberPattern}" /></span></td></tr>
								<tr><td><span class="details">:<fmt:formatNumber value="${paymentInfoModel.prepaidAccBalance}"  pattern="${numberPattern}" /></span></td></tr>
								<tr><td><span class="details">:<fmt:formatNumber value="${paymentInfoModel.bankGuarenteeBalance}"  pattern="${numberPattern}" /></span></td></tr>
							
							</table>
						</td>
					</tr>
				</table>
					</td>
				</tr>
			</table>
		</div>
			
			<div>
			
				<%-- <table border="0" style="width: 100%" >
					<tr>
						<td>
							<table border="0">
										<tr><td><span class="subheading"><spring:message code="payment.preview.price" /></span></td></tr>
										<c:if test="${not empty paymentInfoModel.overLoadCharges &&  paymentInfoModel.overLoadCharges!=null}">
										<tr><td><span class="subheading"><spring:message code="payment.preview.emp.overload.chrg" /></span></td></tr>
										</c:if>
										<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
										<tr><td><span class="subheading"><spring:message code="payment.preview.bgprice" /> </span></td></tr>
										</c:if>
										 	<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
										<tr><td><span class="subheading"><spring:message code="payment.preview.totalpr" /> </span></td></tr>
										</c:if>
										<c:if test="${empty paymentInfoModel.bankGuarenteePayment && not empty paymentInfoModel.overLoadCharges}">
										<tr><td><span class="subheading"><spring:message code="payment.preview.totalpr" /> </span></td></tr>
										</c:if>
										
							</table>	
						</td>
				
						<td>
							<table border="0">
								<!-- <tr><td style="width: 100%"></td></tr> -->
								<tr><td><span class="details">:<span class="details"><fmt:formatNumber value="${paymentInfoModel.serviceCharges}"  pattern="${numberPattern}" /></span></span></td></tr>
								<c:if test="${not empty paymentInfoModel.overLoadCharges &&  paymentInfoModel.overLoadCharges!=null}">
								<tr><td>:<span class="details"><fmt:formatNumber value="${paymentInfoModel.overLoadCharges}"  pattern="${numberPattern}" /></span></td></tr>
								</c:if>
								<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
								<tr><td>:<span class="details"><fmt:formatNumber value="${paymentInfoModel.bankGuarenteePayment}"  pattern="${numberPattern}" /></span></td></tr>
								</c:if>
								 	<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
								<tr><td>:<b><span class="details"><fmt:formatNumber value="${paymentInfoModel.bankGuarenteePayment+paymentInfoModel.price}"  pattern="${numberPattern}" /></span></b></td></tr>
								</c:if>
								<c:if test="${empty paymentInfoModel.bankGuarenteePayment && not empty paymentInfoModel.overLoadCharges}">
								<tr><td><b><span class="details"><fmt:formatNumber value="${paymentInfoModel.price}"  pattern="${numberPattern}" /></span></b></td></tr>
								</c:if>
							</table>
						</td>
					</tr>
				</table> --%>
			</div>
			
			
			<%-- <div>
				<span class="subheading"><spring:message
						code="payment.preview.price" /> : </span><span class="details"><fmt:formatNumber value="${paymentInfoModel.serviceCharges}"  pattern="${numberPattern}" /></span>
			</div>
	 		<c:if test="${not empty paymentInfoModel.overLoadCharges &&  paymentInfoModel.overLoadCharges!=null}">
			<div>
				<span class="subheading"><spring:message
						code="payment.preview.emp.overload.chrg" /> : </span><span class="details"><fmt:formatNumber value="${paymentInfoModel.overLoadCharges}"  pattern="${numberPattern}" /></span>
			</div>
			</c:if> 
			<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
			<div>
				<span class="subheading"><spring:message
						code="payment.preview.bgprice" /> : </span><span class="details"><fmt:formatNumber value="${paymentInfoModel.bankGuarenteePayment}"  pattern="${numberPattern}" /></span>
			</div>
			</c:if>

			
		 	<c:if test="${not empty paymentInfoModel.bankGuarenteePayment}">
			 	
			<div>
				<span class="subheading"><spring:message
						code="payment.preview.totalpr" /> : </span><span class="details"><fmt:formatNumber value="${paymentInfoModel.bankGuarenteePayment+paymentInfoModel.price}"  pattern="${numberPattern}" /></span>
			</div>
			</c:if> 
			<c:if test="${empty paymentInfoModel.bankGuarenteePayment && not empty paymentInfoModel.overLoadCharges}">
			 	
			<div>
				<span class="subheading"><spring:message
						code="payment.preview.totalpr" /> : </span><span class="details"><fmt:formatNumber value="${paymentInfoModel.price}"  pattern="${numberPattern}" /></span>
			</div>
			</c:if> 
			
			<div>
				<span class="heading"><spring:message
						code="payment.preview.av.balance" /></span>
			</div> --%>
	<%-- 		<div>
				<span class="subheading"><spring:message
						code="payment.preview.res.acc" /> : </span><span class="details"><fmt:formatNumber value="${paymentInfoModel.reservedAccBalance}"  pattern="${numberPattern}" /></span>
			</div>
			<div>
				<span class="subheading"><spring:message
						code="payment.preview.act.acc" /> : </span><span class="details"><fmt:formatNumber value="${paymentInfoModel.prepaidAccBalance}"  pattern="${numberPattern}" /></span>
			</div>
			<div>
				<span class="subheading"><spring:message
						code="payment.preview.bankguar" /> : </span><span class="details"><fmt:formatNumber value="${paymentInfoModel.bankGuarenteeBalance}"  pattern="${numberPattern}" /></span>
			</div> --%>
			<div>
				<%-- <table border="0" style="width: 100%" >
					<tr>
						<td>
							<table border="0">
								<tr><td><div><span class="heading"><spring:message code="payment.preview.av.balance" /></span></div></td></tr>
								<tr><td>	<span class="subheading"><spring:message code="payment.preview.res.acc" />  </span></td></tr>
									<tr><td>	<span class="subheading"><spring:message code="payment.preview.act.acc" /> </span></td></tr>
										<tr><td>	<span class="subheading"><spring:message code="payment.preview.bankguar" /> </span></td></tr>
							</table>	
						</td>
				
						<td>
							<table border="0">
								<tr style="height: 100%"><td>&nbsp;</td></tr>
								<tr><td><span class="details">:<fmt:formatNumber value="${paymentInfoModel.reservedAccBalance}"  pattern="${numberPattern}" /></span></td></tr>
								<tr><td><span class="details">:<fmt:formatNumber value="${paymentInfoModel.prepaidAccBalance}"  pattern="${numberPattern}" /></span></td></tr>
								<tr><td><span class="details">:<fmt:formatNumber value="${paymentInfoModel.bankGuarenteeBalance}"  pattern="${numberPattern}" /></span></td></tr>
							
							</table>
						</td>
					</tr>
				</table> --%>
			</div>
		</div>
		
		<div id="hiddenParams" style="display:none">
			<c:forEach var="item" items="${allParams}" varStatus="status">
		 		<c:if test="${item.displayFlag}"><input name="${item.mapping}" value="${item.value}" type="hidden"></c:if>
		 	</c:forEach>	
		</div>
	
	
		<div style="float:left; margin:20px;">
			<input onclick="submitForm('hiddenParams');" type="submit" class="button_small"
				id="paymentApproveBtn" name="MainUserApprove"
				value='<spring:message code="button.confirm" />' style="float:left;"/>
		</div>
	</c:if>
</div>